package com.burt.exception;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import lombok.extern.log4j.Log4j2;

/**
 * 全局异常处理器
 * 
 * @author luowei1
 * @date 2018/7/6 16:42
 */
@Log4j2
@RestControllerAdvice
public class GlobalDefultExceptionHandler {

    @ExceptionHandler(Exception.class)
    public String defultExcepitonHandler(HttpServletRequest request, Exception e) {
        log.error("全局异常处理 ", e);
        return "err";
    }
}
